﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HuiZe.education.Resource.Controls
{
    /// <summary>
    /// PlayBookControl.xaml 的交互逻辑
    /// </summary>
    public partial class PlayBookControl : UserControl
    {
        public object data { get; set; }
        public string Imageurl { get; set; }
        public string Imagetxt { get; set; }
        public string SourceUrl { get; set; }
        public int Id { get; set; }
        public PlayBookControl()
        {
            InitializeComponent();
            Loaded += PageManager_Loaded;
        }
        private void PageManager_Loaded(object sender, RoutedEventArgs e)
        {
            Image image = new Image();
            image.Source = new BitmapImage(new Uri(Imageurl, UriKind.RelativeOrAbsolute));
            image.Stretch = Stretch.Fill;
            ImageButton.ImageSource = image.Source;
          
            ImageTxt.Text = Imagetxt;
        }

        private void Grid_MouseMove(object sender, MouseEventArgs e)
        {
            ImageTxt.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#B0E0E6"));
        }

        private void Grid_MouseLeave(object sender, MouseEventArgs e)
        {
            ImageTxt.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF"));
        }
    }
}
